<%@ Page ClientTarget="uplevel" EnableEventValidation="false" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" ValidateRequest="false" %>
<%@ Register TagPrefix="cc1" Namespace="MyWebPagesStarterKit.Controls" %><%@ MasterType VirtualPath="~/Site.master" %>


<asp:Content ID="contentPane" ContentPlaceHolderID="mainContent" runat="server">

        <%if (Page.User.IsInRole(MyWebPagesStarterKit.RoleNames.Administrators.ToString())){ %>

            <link rel="stylesheet" type="text/css" href="/administration/resources/css/ui-darkness/jquery-ui-1.7.2.custom.css" />
            <link rel="stylesheet" type="text/css" href="/administration/resources/css/select/ui.select.css"  />
            <link rel="stylesheet" type="text/css" href="/administration/resources/css/pageexplorer/ui.explorer.css"  />
            
            <script type="text/javascript" src="/administration/resources/scripts/ui.core.js"></script>
            <script type="text/javascript" src="/administration/resources/scripts/ui.draggable.js"></script>
            <script type="text/javascript" src="/administration/resources/scripts/jquery-ui-1.7.2.custom.min.js"></script>
            <script type="text/javascript" src="/administration/resources/scripts/ui.selectmenu.js"></script>
            <script type="text/javascript" src="/administration/resources/scripts/ui.pageexplorer.js"></script>

            <%MyWebPagesStarterKit.UserSettings setting = new MyWebPagesStarterKit.UserSettings();%>
            <script type="text/javascript">
            $(document).ready(function() {
                $('select#<%=cmbPositions.ClientID %>').selectmenu({width: 150});
                $('select#<%=cmbSections.ClientID %>').selectmenu({width: 190});
                $('#<%=pageexplorer.ClientID %>')
                     .css({ left:<%=setting.PaletteX%>, top: <%=setting.PaletteY%>, display: 'block' })
                     .draggable({ stop: function(event, ui) {
                            StoreSettings(ui.absolutePosition.left, ui.absolutePosition.top);
                        }
                     });
                 });
            </script>
       
        
     <div runat="server" id="pageexplorer" class="pageexplorer">
        
        <table border="0" style="width: 200px;">
            <tr>
                <td colspan="2"><b style="color: #fff"><asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:stringsRes, pge_Default_Section%>" /></b></td>
            </tr>
              <tr>
                <td colspan="2"><asp:DropDownList runat="server" ID="cmbSections" Width="190"></asp:DropDownList></td>
            </tr>  
            
            <tr>
                 <td colspan="2"><b style="color: #fff"><asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:stringsRes, pge_Default_Section_Position%>" /></b></td>
            </tr>
            <tr>
                 <td><asp:DropDownList runat="server" ID="cmbPositions" Width="170" AutoPostBack="true"></asp:DropDownList></td>
                 <td>&nbsp;&nbsp;<asp:ImageButton ImageUrl="~/Images/Adm/plus_16.png" CssClass="ImgNav" runat="server" ID="btnNewSection" OnClick="btnNewSection_Click" ToolTip="<%$ Resources:stringsRes, pge_Default_AddSection%>" CausesValidation="false" UseSubmitBehavior="false"/></td>
            </tr>
            
            <tr>
                <td colspan="2"><br /><div class="line"></div></td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:CheckBox runat="server" AutoPostBack="true" Text="<%$ Resources:stringsRes, pge_Default_chkPageIsPublished%>" ForeColor="White" ID="chkPageStatus" OnCheckedChanged="PageStatus" />
                    <br /><asp:CheckBox runat="server" AutoPostBack="true" Text="<%$ Resources:stringsRes, pge_Default_chkPageIsHidden%>" ForeColor="White" ID="chkHidden" OnCheckedChanged="HiddenStatus" />
                </td>

            </tr>
            <tr>
                <td colspan="2">
                    <asp:LinkButton runat="server" ID="btnPageSetting" OnClick="ViewAdminPage" CausesValidation="false" ForeColor="White" Text="<%$ Resources:stringsRes, pge_Default_Settings%>" />&nbsp;&nbsp;
                    <cc1:LoginStatus ForeColor="White" runat="server" id="login1"/>
                </td>
            </tr>
        </table>
    </div>
    <%} %>
</asp:Content>
